package v1

import "github.com/gogf/gf/v2/frame/g"

type PageCommonReq struct {
	Page     int `json:"page" in:"query" d:"1" v:"required|min:1" dc:"分页号码，默认1"`
	PageSize int `json:"pageSize" in:"query" d:"10" v:"required|in:10,20,50,100,200" dc:"分页数量，默认10"`
}

type MenuEditCommonReq struct {
	Pid    uint   `json:"pid" v:"required|min:0"`
	Title  string `json:"title" v:"required|length:5,20"`
	Code   string `json:"code" v:"required|length:5,20"`
	Type   int    `json:"type" v:"required|in:1,2"`
	Icon   string `json:"icon" v:"required|length:4,20"`
	Path   string `json:"path" v:"required|length:4,20"`
	Order  int    `json:"order" v:"required|min:0"`
	Hidden int    `json:"hidden" v:"required|in:0,1"`
}

type Res struct{}

type PageReq struct {
	Page     int `json:"page" in:"query" d:"1" v:"required|min:1" dc:"分页号码，默认1"`                     //当前页码
	PageSize int `json:"pageSize" in:"query" d:"10" v:"required|in:10,20,50,100,200" dc:"分页数量，默认10"` //每页数
}

type Author struct {
	Authorization string `p:"AUTHORIZE_TOKEN" in:"header" dc:"token"`
}

type EmptyRes struct {
	g.Meta `mime:"application/json"`
}

type ListRes struct {
	CurrentPage int         `json:"currentPage"`
	Total       interface{} `json:"total"`
}
